/**
 * نموذج الاستفسار السريع - CSS
 * Quick Inquiry Form Styles
 */

/* ========== Modal Overlay ========== */
.inquiry-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

/* ========== Modal Container ========== */
.inquiry-modal-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

/* ========== Close Button ========== */
.inquiry-close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #f0f0f0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #666;
  transition: all 0.3s ease;
  z-index: 10;
}

.inquiry-close-btn:hover {
  background: #e84c3d;
  color: white;
  transform: rotate(90deg);
}

/* ========== Modal Header ========== */
.inquiry-modal-header {
  background: linear-gradient(135deg, #e84c3d, #d94028);
  color: white;
  padding: 30px 25px 25px;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.inquiry-modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 600;
}

.inquiry-modal-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

/* ========== Form Styles ========== */
.inquiry-form {
  padding: 30px 25px;
}

.inquiry-form-group {
  margin-bottom: 20px;
}

.inquiry-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
  font-size: 14px;
}

.inquiry-form-group input,
.inquiry-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.inquiry-form-group input:focus,
.inquiry-form-group textarea:focus {
  outline: none;
  border-color: #e84c3d;
  box-shadow: 0 0 0 3px rgba(232, 76, 61, 0.1);
}

.inquiry-form-group textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
}

/* ========== Character Count ========== */
.char-count {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
  text-align: left;
}

/* ========== Checkbox Group ========== */
.inquiry-form-group.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 25px 0;
}

.inquiry-form-group.checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.inquiry-form-group.checkbox label {
  margin-bottom: 0;
  font-weight: normal;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
}

/* ========== Privacy Link in Checkbox ========== */
.privacy-link {
  color: #e84c3d;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #e84c3d;
}

.privacy-link:hover {
  color: #d63b2d;
  border-bottom-color: #d63b2d;
  text-decoration: underline;
}

.privacy-link:active {
  color: #c82a1b;
  border-bottom-color: #c82a1b;
}

/* ========== Error Messages ========== */
.error-message {
  color: #e84c3d;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.4s ease-in-out;
}

/* ========== Form Actions ========== */
.inquiry-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.inquiry-btn-cancel,
.inquiry-btn-submit {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
}

.inquiry-btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.inquiry-btn-cancel:hover {
  background: #e0e0e0;
}

.inquiry-btn-submit {
  background: linear-gradient(135deg, #e84c3d, #d94028);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.inquiry-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 76, 61, 0.3);
}

.inquiry-btn-submit:active {
  transform: translateY(0);
}

.inquiry-btn-submit i {
  font-size: 16px;
}

/* ========== Loading State ========== */
.inquiry-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.spinner {
  border: 4px solid #f0f0f0;
  border-top: 4px solid #e84c3d;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.inquiry-loading p {
  color: #666;
  font-size: 14px;
  margin: 5px 0;
}

/* ========== Success State ========== */
.success-icon {
  font-size: 60px;
  color: #27ae60;
  margin-bottom: 20px;
  animation: bounceIn 0.6s ease-out;
}

.inquiry-btn-close {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.inquiry-btn-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* ========== Quick Inquiry Button ========== */
.quick-inquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #e84c3d, #d94028);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.quick-inquiry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 76, 61, 0.3);
}

.quick-inquiry-btn i {
  font-size: 14px;
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounceIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========== Contact Methods Options ========== */
.inquiry-contact-methods {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.contact-method-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.contact-method-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #e84c3d;
}

.contact-method-label:hover {
  border-color: #e84c3d;
  background: #fef5f3;
}

.contact-method-label input[type="radio"]:checked {
  accent-color: #e84c3d;
}

.contact-method-label input[type="radio"]:checked + span {
  color: #e84c3d;
  font-weight: 600;
}

.contact-method-label span {
  transition: all 0.3s ease;
  color: #2c3e50;
}

/* ========== Responsive Design ========== */
@media (max-width: 600px) {
  .inquiry-modal-container {
    width: 95%;
    border-radius: 12px;
  }

  .inquiry-modal-header {
    padding: 25px 20px 20px;
  }

  .inquiry-modal-header h2 {
    font-size: 20px;
  }

  .inquiry-form {
    padding: 20px 15px;
  }

  .inquiry-form-group {
    margin-bottom: 15px;
  }

  .inquiry-form-actions {
    flex-direction: column;
  }

  .inquiry-form-actions button {
    width: 100%;
  }

  .inquiry-contact-methods {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .inquiry-modal-container {
    max-height: 95vh;
  }

  .inquiry-modal-header h2 {
    font-size: 18px;
  }

  .inquiry-modal-header p {
    font-size: 12px;
  }

  .inquiry-form-group label {
    font-size: 13px;
  }

  .inquiry-form-group input,
  .inquiry-form-group textarea {
    font-size: 16px;
    padding: 10px 12px;
  }

  .inquiry-loading {
    padding: 40px 20px;
  }

  .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .success-icon {
    font-size: 48px;
  }
}

/* ========== Dark Mode Support ========== */
@media (prefers-color-scheme: dark) {
  .inquiry-modal-container {
    background: #1e1e1e;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  }

  .inquiry-form-group input,
  .inquiry-form-group textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
  }

  .inquiry-form-group label,
  .inquiry-form-group.checkbox label {
    color: #e0e0e0;
  }

  .privacy-link {
    color: #ff7f72;
    border-bottom-color: #ff7f72;
  }

  .privacy-link:hover {
    color: #ff9680;
    border-bottom-color: #ff9680;
  }

  .privacy-link:active {
    color: #ff6b60;
    border-bottom-color: #ff6b60;
  }

  .inquiry-form-group input:focus,
  .inquiry-form-group textarea:focus {
    border-color: #e84c3d;
    box-shadow: 0 0 0 3px rgba(232, 76, 61, 0.2);
  }

  .inquiry-close-btn {
    background: #333;
    color: #999;
  }

  .inquiry-close-btn:hover {
    background: #e84c3d;
    color: white;
  }

  .inquiry-btn-cancel {
    background: #333;
    color: #ccc;
  }

  .inquiry-btn-cancel:hover {
    background: #444;
  }

  .char-count {
    color: #666;
  }

  /* Dark Mode for Contact Methods */
  .contact-method-label {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
  }

  .contact-method-label:hover {
    border-color: #e84c3d;
    background: #3a2a2a;
  }

  .contact-method-label span {
    color: #e0e0e0;
  }
}

/* ========== Privacy Policy Modal ========== */
.privacy-policy-link {
  color: #e84c3d;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.privacy-policy-link:hover {
  color: #d94028;
  text-decoration: none;
}

.privacy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.privacy-modal-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

.privacy-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f0f0f0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #666;
  transition: all 0.3s ease;
  z-index: 10;
}

.privacy-close-btn:hover {
  background: #e84c3d;
  color: white;
  transform: rotate(90deg);
}

.privacy-modal-header {
  background: linear-gradient(135deg, #e84c3d, #d94028);
  color: white;
  padding: 30px 25px;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.privacy-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.privacy-modal-content {
  padding: 30px 25px;
  font-size: 14px;
  line-height: 1.6;
  color: #2c3e50;
}

.privacy-modal-content h3 {
  color: #e84c3d;
  font-size: 16px;
  margin: 20px 0 10px;
  font-weight: 600;
}

.privacy-modal-content h3:first-child {
  margin-top: 0;
}

.privacy-modal-content p {
  margin: 0 0 15px;
  text-align: justify;
}

.privacy-modal-content ul {
  margin: 0 0 15px 20px;
  padding-left: 20px;
}

.privacy-modal-content ul li {
  margin-bottom: 8px;
  text-align: justify;
}

.privacy-modal-actions {
  display: flex;
  justify-content: center;
  padding: 20px 25px;
  border-top: 1px solid #e0e0e0;
}

.privacy-btn-close {
  background: linear-gradient(135deg, #e84c3d, #d94028);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.privacy-btn-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 76, 61, 0.3);
}

/* ========== Privacy Modal Responsive ========== */
@media (max-width: 600px) {
  .privacy-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .privacy-modal-header h2 {
    font-size: 20px;
  }

  .privacy-modal-content {
    padding: 20px 15px;
    font-size: 13px;
  }

  .privacy-modal-content h3 {
    font-size: 15px;
    margin: 15px 0 8px;
  }

  .privacy-modal-content ul {
    margin: 0 0 12px 15px;
    padding-left: 15px;
  }

  .privacy-modal-content ul li {
    margin-bottom: 6px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .privacy-modal-container {
    width: 98%;
  }

  .privacy-modal-header {
    padding: 20px 15px;
  }

  .privacy-modal-header h2 {
    font-size: 18px;
  }

  .privacy-modal-content {
    padding: 15px 12px;
    font-size: 12px;
  }

  .privacy-modal-content h3 {
    font-size: 13px;
    margin: 12px 0 6px;
  }

  .privacy-modal-actions {
    padding: 15px 10px;
  }

  .privacy-btn-close {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* ========== Dark Mode for Privacy Modal ========== */
@media (prefers-color-scheme: dark) {
  .privacy-modal-container {
    background: #1e1e1e;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  }

  .privacy-close-btn {
    background: #333;
    color: #999;
  }

  .privacy-close-btn:hover {
    background: #e84c3d;
    color: white;
  }

  .privacy-modal-content {
    color: #e0e0e0;
  }

  .privacy-modal-content h3 {
    color: #ff7f72;
  }

  .privacy-modal-content p {
    text-align: justify;
  }

  .privacy-modal-content ul {
    color: #d0d0d0;
  }

  .privacy-modal-actions {
    border-top-color: #444;
  }

  .privacy-policy-link {
    color: #ff9b92;
  }

  .privacy-policy-link:hover {
    color: #ffb39f;
  }
}
